#ifndef BOOK_H
#define BOOK_H
#include<iostream>
using namespace std;
class Book
{
    public:
        Book(string number="",string name="",string type="",string author="",
             string publish="",sting pub_time"",float price=0,bool onshelf=true,
             int total_count=0);
             virtual ~Book();
             string getNum();
             void setNum(string number);
             string getName();
             void setName(string name);
             string getType();
             viod setType(string type );
             string getAuthor();
             viod setAuthor(string author);
             string getPublish();
             viod setPublish(string publish );
             string getPubtime();
             viod setPubtime(string pub_time );
             string getPrice();
             viod setPrice(string price );
             string getTotalCount();
             viod setTotalCount(string total_count );
             string getBookOnShelf();
             viod setBookOnShelf(string bool onshelf);
             void bookshow();
             void readFromFile(fstream &);
             void writeToFile(fstream &)const;
             friend istream& operator>>(istream &istrm,Book&book);
             friend ostream& operator>>(ostream &ostrm,const Book&book);
    private:
        string bookNum;
        string bookName;
        string bookType;
        string bookAuthor;
        string bookPublish;
        string bookPubtime;
        float bookPrice;
        bool bookOnShelf;
        int totalCount;
};

#endif // BOOK_H
